<script>
    import Field from "@/components/base/Field.svelte";
    import FieldLabel from "@/components/records/fields/FieldLabel.svelte";

    export let field;
    export let value = undefined;
</script>

<Field class="form-field {field.required ? 'required' : ''}" name={field.name} let:uniqueId>
    <FieldLabel {uniqueId} {field} />

    <input
        type="number"
        id={uniqueId}
        required={field.required}
        min={field.min}
        max={field.max}
        step="any"
        bind:value
    />
</Field>
